<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>查看</title>
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
    <style>
        .swiper {
            width: 100%;
            position: relative;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .swiper-wrapper {
            overflow: hidden;
            position: relative;
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            width: 300%;
        }

        .swiper-slide {
            text-align: center;
            font-size: 18px;
            background: #fff;
            display: -webkit-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            -webkit-align-items: center;
            align-items: center;
            height: 330px;
        }

        .swiper-slide img {
            display: block;
        }

        .swiper-pagination {
            position: absolute;
            bottom: 16px;
            right: 8px;
            height: 22px;
            padding: 0 10px;
            background-color: rgba(0, 0, 0, 0.4);
            border-radius: 11px;
            text-align: center;
            font-size: 10px;
            line-height: 22px;
            color: white;
        }

        .swiper-pagination-bullet {
            width: 3px;
            height: 3px;
            text-align: center;
            line-height: 3px;
            opacity: 1;
            background: rgba(255, 255, 255, 0.4);
            margin: 0 2px;
            border-radius: 50%;
        }

        .swiper-pagination-bullet-active {
            background: #fff;
            width: 12px;
            height: 3px;
            border-radius: 1.5px;
        }

        .-my-swiper-img {
            width: 100%;
            height: 330px;
        }
    </style>
</head>

<body>
    <div class="page" @vue:mounted="mounted">
        <div class="nav-bar">
            <div onclick="core.back()" class="nav-bar-back">

                <span class="icon iconfont icon-fanhui m_r_10"></span>
                <span class="nav-bar-back-text">返回</span>
            </div>
            <span class="nav-bar-title">{{data.title}} </span>
        </div>
        <div class="scroll-view-y">
            <!-- 轮播图 -->
            <div class="swiper mySwiper">
                <div class="swiper-wrapper">
                </div>
                <div class="swiper-pagination"></div>
            </div>
            <!-- 商品信息 -->


            <div class="detail-good">
                <div class="  p15 " v-html="data.content">
                </div>
            </div>
        </div>

    </div>
</body>

<script src="../script/api.js"></script>
<script src="../script/swiper-bundle.min.js"></script>
<script src="../script/common.js"></script>

<script type="module">
    import { createApp } from 'https://www.chenxiangle.com/app/web/script/pvue.js'
    const APP = () => {
        createApp({
            data: {
                title: "",
                content: "",
            },
            async loadnews() {
                let id = core.getParam("id");
                console.log(id);
                let res = await core.getNews(id);
                core.log(res)
                this.data.title = res.data.title;
                this.data.content = res.data.content;

            },
            mounted() {
                this.loadnews();
            }
        }).mount()
    }

    window.apiready = () => {
        $api.fixStatusBar($api.dom('.nav-bar'));
        APP();
    }
</script>

</html>